package org.achartengine.util;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * 增加点击事件封装item与其对应的RectF的边界数值的数组
 * 
 * @author huangtg
 */
public class RecfYEntryList
{
	/**
	 * mList map<String, int[]> String is title of click item int[] is the Recf for the item's topY,buttomY
	 */
	private static List<Map<String, Float[]>> mYList;
	
	private static String mType;
	
	private RecfYEntryList()
	{
		if (mYList == null)
		{
			mYList = new ArrayList<Map<String, Float[]>>();
		}
	}
	
	/**
	 * get the mList: if mList is null, new mList;if mList is unull,will return the mList
	 * 
	 * @return mList
	 */
	public static List<Map<String, Float[]>> getList()
	{
		new RecfYEntryList();
		return mYList;
	}
	
	/**
	 * reset mList to be null
	 */
	public static List<Map<String, Float[]>> resetList()
	{
		if (mYList != null)
		{
			mYList.clear();
			mYList = null;
		}
		
		return mYList;
	}
	
}
